Value Numbering

نویسندگان

  • Preston Briggs
  • Keith D. Cooper
  • L. Taylor Simpson
چکیده

Value numbering is a compiler-based program analysis method that allows redundant computations to be removed. This paper compares hash-based approaches derived from the classic local algorithm1 with partitioning approaches based on the work of Alpern, Wegman, and Zadeck2. Historically, the hash-based algorithm has been applied to single basic blocks or extended basic blocks. We have improved the technique to operate over the routine’s dominator tree. The partitioning approach partitions the values in the routine into congruence classes and removes computations when one congruent value dominates another. We have extended this technique to remove computations that define a value in the set of available expressions (AVAIL)3. Also, we are able to apply a version of Morel and Renvoise’s partial redundancy elimination4 to remove even more redundancies. The paper presents a series of hash-based algorithms and a series of refinements to the partitioning technique. Within each series, it can be proved that each method discovers at least as many redundancies as its predecessors. Unfortunately, no such relationship exists between the hash-based and global techniques. On some programs, the hash-based techniques eliminate more redundancies than the partitioning techniques, while on others, partitioning wins. We experimentally compare the improvements made by these techniques when applied to real programs. These results will be useful for commercial compiler writers who wish to assess the potential impact of each technique before implementation.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Simple Algorithm for Global Value Numbering

Global Value Numbering(GVN) is a method for detecting redundant computations in programs. Here, we introduce the problem of Global Value Numbering in its original form, as conceived by Kildall(1973), and present an algorithm which is a simpler variant of Kildall’s. The algorithm uses the concept of value expression an abstraction of a set of expressions enabling a representation of the equivale...

متن کامل

A Polynomial-Time Algorithm for Global Value Numbering

We describe a polynomial-time algorithm for global value numbering, which is the problem of discovering equivalences among program sub-expressions. We treat all conditionals as non-deterministic and all program operators as uninterpreted. We show that there are programs for which the set of all equivalences contains terms whose value graph representation requires exponential size. Our algorithm...

متن کامل

A Note on "A polynomial-time algorithm for global value numbering"

A Global Value Numbering(GVN) algorithm is considered to be complete (or precise), if it can detect all Herbrand equivalences among expressions in a program. A polynomial time algorithm for GVN is presented by Gulwani and Necula(2006). Here we present two problems with this algorithm that prevents detection of some of the Herbrand equivalences among program expressions. We suggest improvements ...

متن کامل

Value-Driven Code Motion

Value-driven code motion is an improvement to classical code motion techniques that takes advantage of the results of global value numbering. Traditional data-ow analysis frameworks must assume that every deenition produces a distinct value. Therefore, an instruction cannot move past a deenition of one of its subexpressions. This restriction can be relaxed when certain deenitions are known to p...

متن کامل

An Improved Algorithm for Redundancy Detection Using Global Value Numbering

Global value numbering (GVN) is a method for detecting equivalent expressions in programs. Most of the GVN algorithms concentrate on detecting equalities among variables and hence, are limited in their ability to identify value-based redundancies. In this paper, we suggest improvements by which the efficient GVN algorithm by Gulwani and Necula (2007) can be made to detect expression equivalence...

متن کامل

Second-Order Value Numbering

We present second-order value numbering, a new optimization method for suppressing redundancy, in a version tailored to the application for optimizing the decision procedure of jMosel, a verification tool set for monadic second-order logic on strings (M2L(Str)). The method extends the well-known concept of value numbering to consider not merely values, but semantics transformers that can be eff...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 27  شماره 

صفحات  -

تاریخ انتشار 1997